package com.spring.config;

import com.spring.entity.UserEntity;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.spring")
public class MyConfig {
    //@Configuration 相当于创建了spring.xml
    @Bean
    public UserEntity userEntity(){
        return new UserEntity();
    }
}
